<div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>
                        <vc:i18n name="发票抬头" namespace="ownerApplyInvoice"></vc:i18n>
                    </h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-white btn-sm" v-on:click="vc.goBack()">
                            返回
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label text-right">
                                    <vc:i18n name="发票抬头" namespace="ownerApplyInvoice"></vc:i18n>
                                </label>
                                <div class="col-sm-3">
                                    <input v-model="ownerApplyInvoiceInfo.invoiceName" disabled type="text"
                                        :placeholder="vc.i18n('必填，请选择发票抬头','ownerApplyInvoice')" class="form-control">
                                </div>
                                <div class="col-sm-1">
                                    <button type="button" class="btn btn-primary btn-sm"
                                        v-on:click="_openChooseOwner()">选择
                                    </button>
                                </div>
                                <label class="col-sm-2 col-form-label text-right">
                                    <vc:i18n name="纳税人识别号" namespace="ownerApplyInvoice"></vc:i18n>
                                </label>
                                <div class="col-sm-4">
                                    <input v-model="ownerApplyInvoiceInfo.invoiceNum" type="text"
                                        :placeholder="vc.i18n('必填，请选择纳税人识别号','ownerApplyInvoice')" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label text-right">
                                    <vc:i18n name="发票类型" namespace="ownerApplyInvoice"></vc:i18n>
                                </label>
                                <div class="col-sm-4">
                                    <select class="custom-select" v-model="ownerApplyInvoiceInfo.invoiceType">
                                        <option selected disabled value="">{{vc.i18n('必填，请选择发票类型','ownerApplyInvoice')}}
                                        </option>
                                        <option value="1001">{{vc.i18n('个人','ownerApplyInvoice')}}</option>
                                        <option value="2002">{{vc.i18n('企业','ownerApplyInvoice')}}</option>
                                    </select>
                                </div>
                                <label class="col-sm-2 col-form-label text-right">
                                    <vc:i18n name="地址、电话" namespace="ownerApplyInvoice"></vc:i18n>
                                </label>
                                <div class="col-sm-4">
                                    <input v-model="ownerApplyInvoiceInfo.invoiceAddress" type="text"
                                        :placeholder="vc.i18n('必填，请选择地址、电话','ownerApplyInvoice')" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label text-right">
                                    <vc:i18n name="业主" namespace="ownerApplyInvoice"></vc:i18n>
                                </label>
                                <div class="col-sm-4">
                                    <input v-model="ownerApplyInvoiceInfo.ownerName" disabled type="text"
                                        :placeholder="vc.i18n('必填，请选择地址、电话','ownerApplyInvoice')" class="form-control">
                                </div>
                                <label class="col-sm-2 col-form-label text-right">
                                    <vc:i18n name="开票内容" namespace="ownerApplyInvoice"></vc:i18n>
                                </label>
                                <div class="col-sm-4">
                                    <select class="custom-select" v-model="ownerApplyInvoiceInfo.invoiceFlag" @change="_changeInvoiceFlag">
                                        <option selected disabled value="">{{vc.i18n('必填，请选择开票内容','ownerApplyInvoice')}}
                                        </option>
                                        <option value="FEE">{{vc.i18n('已缴费用','ownerApplyInvoice')}}</option>
                                        <option value="ACCT">{{vc.i18n('账户预存','ownerApplyInvoice')}}</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <vc:create path="fee/searchOwnerInvoice" emitChooseOwner="ownerApplyInvoice"
                emitLoadData="ownerApplyInvoice">
            </vc:create>
        </div>
    </div>

    <div class="row" v-if="ownerApplyInvoiceInfo.invoiceFlag == 'FEE'">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>
                        <vc:i18n name="已缴费费用" namespace="ownerApplyInvoice"></vc:i18n>
                    </h5>
                    <div class="ibox-tools" style="top:10px;">

                    </div>
                </div>
                <div class="ibox-content">
                    <table class="footable table table-stripped toggle-arrow-tiny" style="margin-top:10px"
                        data-page-size="10">
                        <thead>
                            <tr>
                                <th class="text-center"><input type="checkbox" class="i-checks all-check"
                                        @click="checkAll($event)"></th>
                                <th class="text-center">
                                    <vc:i18n name="费用项" namespace="ownerApplyInvoice"></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name="收费对象" namespace="ownerApplyInvoice"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="应收/实收" namespace="ownerApplyInvoice"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="缴费方式" namespace="ownerApplyInvoice"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="缴费起始段" namespace="ownerApplyInvoice"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="缴费时间" namespace="ownerApplyInvoice"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="收银员" namespace="ownerApplyInvoice"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="状态" namespace="ownerApplyInvoice"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="备注" namespace="ownerApplyInvoice"></vc:i18n>
                                </th>

                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="feeDetail in ownerApplyInvoiceInfo.feeDetails">
                                <td class="text-center">
                                    <input type="checkbox" class="i-checks checkItem" v-bind:value="feeDetail.detailId"
                                        v-model="ownerApplyInvoiceInfo.detailIds">
                                </td>
                                <td class="text-center">
                                    {{feeDetail.feeName}}
                                </td>
                                <td class="text-center">
                                    {{feeDetail.payerObjName}}
                                </td>
                                <td class="text-center">
                                    {{feeDetail.receivableAmount}}/{{feeDetail.receivedAmount}}
                                </td>
                                <td class="text-center">
                                    {{feeDetail.primeRateName}}
                                </td>
                                <td class="text-center">
                                    {{vc.dateFormat(feeDetail.startTime)}}~</br>
                                    <span v-if="feeDetail.startTime >= feeDetail.endTime">
                                        {{vc.dateFormat(feeDetail.endTime)}}
                                    </span>
                                    <span v-else>
                                        {{vc.dateSubOneDay(vc.dateFormat(feeDetail.endTime),vc.dateFormat(feeDetail.endTime),feeDetail.feeFlag)}}
                                    </span>
                                </td>
                                <td class="text-center">
                                    {{feeDetail.createTime}}
                                </td>
                                <td class="text-center">
                                    {{feeDetail.cashierName || '-'}}
                                </td>
                                <td class="text-center">
                                    {{feeDetail.stateName}}
                                </td>
                                <td class="text-center">
                                    {{feeDetail.remark}}
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <!-- 分页 -->
                    <vc:create path="frame/pagination"></vc:create>
                </div>
            </div>
        </div>
    </div>
    <div class="row" v-if="ownerApplyInvoiceInfo.invoiceFlag == 'ACCT'">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>
                        <vc:i18n name="账户预存" namespace="ownerApplyInvoice"></vc:i18n>
                    </h5>
                    <div class="ibox-tools" style="top:10px;">

                    </div>
                </div>
                <div class="ibox-content">
                    <table class="footable table table-stripped toggle-arrow-tiny" style="margin-top:10px"
                        data-page-size="10">
                        <thead>
                            <tr>
                                <th class="text-center"><input type="checkbox" class="i-checks all-check-acct"
                                        @click="checkAllAcct($event)"></th>
                                <th class="text-center">
                                    <vc:i18n name="账户名称" namespace="ownerApplyInvoice"></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name="账户类型" namespace="ownerApplyInvoice"></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name="业主" namespace="ownerApplyInvoice"></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name="预存金额" namespace="ownerApplyInvoice"></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name="预存方式" namespace="ownerApplyInvoice"></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name="总金额" namespace="ownerApplyInvoice"></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name="预存时间" namespace="ownerApplyInvoice"></vc:i18n>
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="acctDetail in ownerApplyInvoiceInfo.acctDetails">
                                <td class="text-center">
                                    <input type="checkbox" class="i-checks checkItemAcct" v-bind:value="acctDetail.arId"
                                        v-model="ownerApplyInvoiceInfo.arIds">
                                </td>
                                <td class="text-center">{{acctDetail.acctName}}</td>
                                <td class="text-center">{{acctDetail.acctTypeName}}</td>
                                <td class="text-center">{{acctDetail.ownerName}}</td>
                                <td class="text-center">{{acctDetail.receivedAmount}}</td>
                                <td class="text-center">{{acctDetail.primeRateName}}</td>
                                <td class="text-center">{{acctDetail.amount}}元</td>
                                <td class="text-center">{{acctDetail.createTime}}</td>
                            </tr>
                        </tbody>
                    </table>
                    <!-- 分页 -->
                    <vc:create path="frame/pagination"></vc:create>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12 text-right">
            <button class="btn btn-primary" type="button" v-on:click="_ownerApplySubmit()"><i
                    class="fa fa-check"></i>&nbsp;提交</button>
        </div>
    </div>
</div>